 

        <g:set var="entityName" value="${message(code: 'teacher.label', default: 'Teacher')}" />
            <div class="list">
                <table>
                    <thead>
                        <tr>

                            <g:sortableColumn property="NO" title="${message(code: 'teacher.NO.label', default: 'NO')}" />
                        
                            <g:sortableColumn property="username" title="${message(code: 'teacher.username.label', default: 'Username')}" />                        
                        
                            <g:sortableColumn property="name" title="${message(code: 'teacher.name.label', default: 'Name')}" /> 
                            
                            <g:sortableColumn property="school" title="${message(code: 'teacher.school.label', default: 'school')}" />

                            <th>${message(code: 'default.role.label', default: 'Role')}</th>
                        
                            <g:sortableColumn property="sex" title="${message(code: 'teacher.sex.label', default: 'Sex')}" />
                        
                             <g:sortableColumn property="enable" title="${message(code: 'teacher.enable.label', default: 'Enable')}" />
                            
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${teacherInstanceList}" status="i" var="teacherInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td>${fieldValue(bean: teacherInstance, field: "NO")}</td>

                            <td><g:link action="show" id="${teacherInstance.id}" controller="teacher" params="[searchFlag:true]">${teacherInstance.escpeName()}</g:link></td>
                        
                            <td>${fieldValue(bean: teacherInstance, field: "name")}</td>

                            <td>${fieldValue(bean: teacherInstance, field: "school")}</td>

                            <td><g:each in="${teacherInstance.authorities}" status="j" var="aRole">
                                ${aRole?.description}</br>
                            </g:each></td>
                        
                            <td>${fieldValue(bean: teacherInstance, field: "sex")}</td>                            

                            <td><g:formatBoolean boolean="${teacherInstance.enabled}" />
                            <g:link controller="teacherMgr" action="goswitch" id="${teacherInstance.id}" params="[searchFlag:true]">${!teacherInstance.enabled?"开启":"关闭"}
                            </g:link>
                            </td>

                            <td class="operate">
                            <x:operate width="420">
                                <g:link controller="teacher" action="edit" id="${teacherInstance.id}" params="[searchFlag:true]"><g:message code="default.button.edit.label" /></g:link> | 
                                <g:link controller="teacherMgr" action="resetPassword" id="${teacherInstance.id}" onclick="return confirm('${message(code: 'default.button.reset.password.message')}');" params="[searchFlag:true]"><g:message code="default.button.passwdset.label" /></g:link> | 
                                <g:link controller="teacherMgr" action="roleset" id="${teacherInstance.id}"  params="[searchFlag:true]"><g:message code="default.button.roleset.label" /></g:link> | 
                                <g:link controller="teacherMgr" action="organizeset" id="${teacherInstance.id}"  params="[searchFlag:true]"><g:message code="default.button.orgnizaset.label" /></g:link> | 
                                <g:link controller="teacherMgr" action="courseset" id="${teacherInstance.id}"  params="[searchFlag:true]"><g:message code="default.button.courseset.label" /></g:link> | 
                                <g:link controller="teacherEvaluate" action="list" id="${teacherInstance.id}"  params="[searchFlag:true]"><g:message code="default.button.evaluate.label" /></g:link> | 
                                <g:link controller="teacherMgr" action="createblog" id="${teacherInstance.id}"  params="[searchFlag:true]"><g:message code="default.button.createblog.label" /></g:link>
                            </x:operate>
                            </td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
			<div class="paginateButtons">
            </div>
